package edu.wfu.preparedDishes.recipes.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import edu.wfu.preparedDishes.common.utils.PageUtils;
import edu.wfu.preparedDishes.common.utils.Query;
import edu.wfu.preparedDishes.recipes.dao.RecipesDao;
import edu.wfu.preparedDishes.recipes.entity.RecipesEntity;
import edu.wfu.preparedDishes.recipes.service.RecipesService;
import org.springframework.stereotype.Service;
import java.util.Map;



@Service("recipesService")
public class RecipesServiceImpl extends ServiceImpl<RecipesDao, RecipesEntity> implements RecipesService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<RecipesEntity> page = this.page(
                new Query<RecipesEntity>().getPage(params),
                new QueryWrapper<RecipesEntity>()
        );

        return new PageUtils(page);
    }

}